<template>
	<view class="wrap" :data-theme='theme()' :class="theme() || ''" v-if="!loading">
		<!-- <u-notice-bar text="羊毛党清勿下单,恶意欠租法务会起诉,禁止未成年人下单!"></u-notice-bar> -->
		<u-sticky>
			<u-notice-bar text="羊毛党清勿下单,恶意欠租法务会起诉,禁止未成年人下单!" color="#3dd3cb" bgColor="#dff4f4"></u-notice-bar>
			<view class="" style="background-color: #fff;">
				<u-tabs :list="list1" :activeStyle="{
        color: '#14AAA8',
        fontWeight: 'bold',
        transform: 'scale(1.05)'
    }" :inactiveStyle="{
        color: '#606266',
        transform: 'scale(1)'
    }" :scrollable='false' lineColor="#14AAA8" lineActive='-4rpx' @click="tabsClick"></u-tabs>
			</view>
		</u-sticky>

		<view class="" v-if="current=='0'">
			<my-info @changeStates="changeStates" :exist_address="exist_address"></my-info>
		</view>
		<view class="" v-if="current=='1'">
			<my-infos :data_ziti='ziti' :Address="store_list" :key="datekey"></my-infos>
		</view>
		<!--购买的产品-->
		<view class="vender">
			<view class="list">
				<view v-for="(supplier_item, supplier_index) in ProductData" :key="supplier_index">
					<view class="item" v-for="(item, index) in supplier_item.productList" :key="index">
						<view class="d-f">
							<view class="cover">
								<image :src="item.product_image" mode="aspectFit"></image>
							</view>
							<view class="info">
								<view class="d-b-s">
									<view class="flex-1">
										<view class="title f32 gray3"
											style="font-size: 24rpx; font-weight: 500;width: 100%;">
											{{ item.product_name }}
										</view>
										<view class="describe mt10 f24" style="font-size: 23rpx;width: 100%;">
											{{ item.product_sku.product_attr }}
										</view>
									</view>
									<view>
									</view>
								</view>
							</view>
						</view>
					</view>
					<view class="d-f-c">
						<view v-if="supplier_item.orderData.delivery==10" @tap="DistUp(supplier_item)">
							配送方式 <text class="extp">普通快递</text>
						</view>
						<view v-if="supplier_item.orderData.delivery==20" @tap="DistUp(supplier_item)">
							<view class="info d-s-s" style="padding-left: 0;">
								<text class="zt theme-btn">当前自提点</text>
								<view class="province-c-a d-s-s flex-1">
									<text>{{ store_list[supplier_item.shop_supplier_id]}}</text>
								</view>
							</view>
						</view>
						<view v-if="supplier_item.orderData.delivery==30">
							虚拟商品：无需物流
						</view>
						<view class="dfjac" v-if="supplier_item.orderData.delivery!=30" @tap="DistUp(supplier_item)">
							<view v-if="supplier_item.orderData.delivery==10">
								{{supplier_item.orderData.express_price != 0?"￥ "+supplier_item.orderData.express_price:"快递 免费"}}
							</view>
							<i class='iconfont icon-jiantou'></i>
						</view>
					</view>

					<view class="qz d-b-c ">
						<view class="biank3 d-b-c">
							<view class="">
								<image src="../../static/icon/21.png" mode="aspectFit"></image>
							</view>
							<view class="cont d-s-s d-c ml20">
								<view class="sq1">
									预计起租日
								</view>
								<view class="sq2 mt10">
									{{start_time}}
								</view>
							</view>
						</view>
						<view class="biank3 d-b-c ">
							<image src="../../static/icon/22.png" mode="aspectFit"></image>
							<view class="cont d-s-s d-c ml20">
								<view class="sq1">
									到期日
								</view>
								<view class="sq2 mt10">
									{{end_time}}
								</view>
							</view>
						</view>
					</view>
					<view class="tis">
						<view class="tishi">提示：一般货物会在24小时内发出，如有特殊情况，客服会主动联系告知；快递运输期间不算租期，实际起租日为订单日后推3天.</view>
					</view>

					<view class="d-f-c">
						<view class="ww100">
							<view class="meiridata">
								<view class="yjmr">首期实付租金</view>
								<view class="yjmr">
									￥{{lease_time.end_period_price}}
									<!-- ￥{{realVal}} -->
								</view>
							</view>
							<u-line margin="12px 0"></u-line>
							<view v-if="suiping" class="suiping1">
								<view class="texts">
									<view>首期租金</view>
									<view>￥{{lease_time.end_period_price}}</view>
								</view>
								<view class="texts">
									<view>剩余租期</view>
									<!-- <view>{{lease_time.remaining_lease_term}}</view> -->
									<view>￥{{lease_time.end_period_price}} * {{zqi - 1}}期</view>
								</view>
								<view class="texts">
									<view>总租金</view>
									<view>￥{{order_total_price}}</view>
								</view>
								<view class="texts">
									<view>配送方式</view>
									<view>寄出包邮/顺丰包邮</view>
								</view>


								<view class="texts">
									<view>碎屏换新</view>
									<view>￥499</view>
								</view>
							</view>

							<view v-else class="suiping1">
								<view class="texts">
									<view>首期租金</view>
									<view>￥{{lease_time.end_period_price}}</view>
								</view>
								<view class="texts">
									<view>剩余租金</view>
									<!-- <view>{{lease_time.remaining_lease_term}}</view> -->
									<view>￥{{lease_time.end_period_price}} * {{zqi - 1}}期</view>
								</view>
								<view class="texts">
									<view>总租金</view>
									<view>￥{{order_total_price}}</view>
								</view>
								<view class="texts">
									<view>配送方式</view>
									<view>顺丰快递｜寄出包邮</view>
								</view>
								<view class="texts">
									<view>到期买断价格</view>
									<view>{{order_total_price}}</view>
								</view>

							</view>
							<view class="texts2" v-if="zmshow1 == 1">
								<view class="top">总押金</view>
								<view class="xia">芝麻信用 ▪ 有机会免押</view>
							</view>

						</view>
					</view>
					<!--空格-->
					<view class="kongke"></view>
					<!--空格-->
					<view class="kongke"></view>
					<!--到期完结-->
					<view v-if="lease_type=='2'" class="dao">
						<view class="dao1">到期完结</view>
						<view class="dao2">{{buy_out_price}}</view>
					</view>
					<view class="dao" v-else>
						<view class="dao1">到期完结</view>
						<view class="dao2">0.00</view>
					</view>
					<view class="kongke"></view>


					<view class="item" v-if="OrderData.is_coupon">
						<text class="key"
							style="font-size: 34rpx;font-weight: bold;font-family: 'Adobe Heiti Std R';">平台优惠券：</text>
						<block v-if="coupon_num > 0">
							<text class="f24  theme-price" v-if="OrderData.coupon_money_sys > 0"
								@tap="onTogglePopupCoupon(coupon_list,0)">-￥{{OrderData.coupon_money_sys}}</text>
							<text v-else class="f24  theme-price"
								@tap="onTogglePopupCoupon(coupon_list,0)">有{{ coupon_num }}张优惠券可用</text>
						</block>
						<text v-else class="f24 gray9">无优惠券可用</text>
					</view>
					<view class="item" v-if="OrderData.product_reduce_money > 0">
						<text class="key">商品立减：</text>
						<view>
							<text class="theme-price f24">-￥{{ OrderData.product_reduce_money }}</text>
						</view>
					</view>
					<view class="item" style="display: flex;justify-content: space-between;align-items: center;"
						v-if="OrderData.is_use_points && OrderData.force_points == false &&OrderData.points_money != 0">
						<text class="key">可用积分抵扣：</text>
						<view class="">
							<text class="theme-price f24">-￥{{toDecimal2(OrderData.points_money)}}</text>
							<switch style="transform: scale(0.7); margin-right: -10rpx;" checked=true
								@change="onShowPoints" />
						</view>
					</view>

					<view class="kongke"></view>
					<!--还款计划-->
					<view class="zkjh" @click="huankuan()">
						<view class="huankuanjihua">租赁计划</view>
						<view class="xkh">
							<u-icon name="arrow-right"></u-icon>
						</view>
					</view>
					<view class="kongke"></view>

					<!--还款计划弹窗-->
					<view class="huankuanjihua1">
						<u-popup :show="show2" mode="bottom" @close="close2" @open="open2">
							<view class="tanchuang1">

								<block v-for="(item,index) in timedata">
									<view>
										第{{index}}期
										<text class="stime">{{timedata[index]}} </text>
										-￥{{lease_time.end_period_price}}
									</view>
								</block>
								<view class="shuju1" v-if="lease_type=='2'">
									<text class="daoqi">到期完结/租完买断</text>
									<text style="color: skyblue;">-￥{{buy_out_price}}</text>
								</view>

							</view>
						</u-popup>
					</view>

					<view class="ding1">
						<view class="ww100">
							<view class="mb20" style="font-size: 34rpx;font-weight: bold;">邮箱地址</view>
							<view>
								<u-input v-model="store_data[supplier_item.shop_supplier_id].buyer_email" placeholder="请填写邮箱地址"></u-input>
							</view>
						</view>
					</view>
					<view class="ding1">
						<view class="ww100">
							<view class="mb20" style="font-size: 34rpx;font-weight: bold;">订单备注</view>
							<view>
								<u--textarea v-model="store_data[supplier_item.shop_supplier_id].remark"
									placeholder="选填,请先和商家协商一致"></u--textarea>
							</view>
						</view>
					</view>

				</view>
			</view>
		</view>
		<!--其它费用-->
		<view class="buy-checkout">
			<view :class="['item','animation-'+animation]">
				<u-checkbox-group>
					<u-checkbox v-model="checkedData" size='12' labelSize='12' activeColor="#5BC5BB" shape="circle" label="我已阅读并同意"
						@change="checkedChange"></u-checkbox>
				</u-checkbox-group>
				<view class="tongyi">
					<text class="tongyi1"></text>
					<text class="tongyi2" @click="fuwu()">“租赁服务及相关协议”</text>
				</view>
			</view>

			<block v-if="tokendata == ''">
				<view class="confirmdata">
					<button class="confirm-btn" @getAuthorize="onGetAuthorize1" open-type="getAuthorize"
						scope="phoneNumber" onError="handleAuthError">
						授权登录审核
					</button>
				</view>
			</block>
			<block v-else>
				<view class="tjshkdData">
					<button type="primary" v-if='zfshow>0' class="tjshkd">提交审核</button>
					<block v-else>
						<view class="tjshkd d-b-c" v-if="orderPersonalInformation == '1'" @click="tzxs()">
							<view>
								<text>共1件，首期实付</text>
							</view>
							<view class="">
								<text>去支付</text>
							</view>
						</view>
						<view class="tjshkd d-b-c" v-else @click="testing()">
							<view class="d-a-c">
								<text class="sjsj">共1件，首期实付</text>
								<view class="sjred d-a-c ml20">
									￥<text class="sjred-t">{{lease_time.end_period_price}}</text>
								</view>
							</view>
							<view class="sjbtn d-c-c">
								<text>提交审核</text>
							</view>
						</view>
					</block>
				</view>
			</block>

		</view>

		<!--优惠券-->
		<Coupon :isCoupon="isCoupon" :couponList="couponList" @close="closeCouponFunc"></Coupon>
		<Dist :isDist="isDist" :chooseSotr="chooseSotr" @close="closeDistFunc" :extract_store="extract_store"
			:last_extract="last_extract" :deliverySetting="deliverySetting"></Dist>

		<!-- 下单前认证 -->
		<u-popup :show="verify" @close="verify = false" mode="bottom" :closeable='true'>
			<view style="padding: 25rpx;">
				<view class="content2">
					<view class="top1">
						紧急联系人
					</view>
					<!-- 真实姓名 -->
					<view class="top2">
						<view class="zsname"> 真实姓名: </view>
						<input type="text" v-model="lxr1.jjname" />
					</view>
					<!-- 姓名 -->
					<view class="top2">
						<view class="zsname"> 姓名: </view>
						<input type="text" v-model="lxr1.name" />
					</view>
					<!-- 电话号码 -->
					<view class="top2">
						<view class="zsname"> 电话: </view>
						<input type="text" v-model="lxr1.tel" />
					</view>
					<!-- 关系 -->
					<view class="top5">
						<view class="relation"> 关系: </view>
						<u-form>
							<u-form-item borderBottom>
								<u-radio-group v-model="lxr1.relation" placement="row">
									<u-radio activeColor="#5BC5BB" iconSize="12" :customStyle="{marginRight:'6rpx'}"
										v-for="(item, index) in radiolist1" :key="index" :label="item.name"
										:name="item.val">
									</u-radio>
								</u-radio-group>
							</u-form-item>
						</u-form>
					</view>
					<!-- 身份证 -->
					<view>
						<view class="shenfen">点击下面方框上传身份证正面照:</view>
						<view class="diyige" @click="changeAvatarUrl">
							<image src="@/static/hha/32.png" v-if="formData.sfzpositive == ''" class="jiahao" mode="aspectFit"></image>
							<image v-else :src="formData.sfzpositive" class="jiahao" mode="aspectFit">
							</image>
						</view>
						<view class="shenfen">点击下面方框上传身份证反面照:</view>
						<view class="diyige" @click="changeAvatarUrl1">
							<image src="@/static/hha/33.png" v-if="formData.sfzback == ''" class="jiahao" mode="aspectFit"></image>
							<image v-else :src="formData.sfzback" class="jiahao" mode="aspectFit"></image>
						</view>
					</view>

				</view>
				<u-button color='#5BC5BB' shape="circle" @click="submitlxr" :hairline="false" text="提交"></u-button>
			</view>
		</u-popup>
		<!-- 实名认证 -->
		<u-popup :show="showdd" mode="top" @close="close">
			<view :style="{height : tkheight + 'rpx'}">
				<view class="content">
					<view>
						<image src="../../static/hha/sfztx.png"></image>
					</view>
					<view class="smrz">
						实名认证
					</view>
					<view class="smrz2">
						根据实名制下单要求，使用信用免押服务 <br> 前你需要通过实名认证，并授权如下信息
					</view>
				</view>
				<view class="bs_xx">
					<view class="sfxx">
						<view class="sfxx2">
							<view>
								姓名与支付宝实名认证信息相关联且不可更改
							</view>
							<view>
								提交既同意e签宝采集人脸照片并提供给：成都北抖鑫网络科技有限公司用于实名认证
							</view>
						</view>

						<view class="sfxx3">
							<view class="sfxx4">
								<view style="font-size: 30rpx;margin: 10rpx 0;">
									您的姓名：
								</view>
								<u-input placeholder="您的姓名" border="surround" v-model="value1"></u-input>
							</view>

							<view class="sfxx4">
								<view style="font-size: 30rpx;margin: 10rpx 0;">
									您的身份证号：
								</view>
								<u-input placeholder="您的身份证号" border="surround" v-model="value2"></u-input>
							</view>
						</view>
					</view>
					<view class="anniu">
						<u-button type="primary" text="确定" @click="queding()"></u-button>
					</view>
				</view>
			</view>
		</u-popup>
		<!-- 上传图片 -->
		<Upload ref="upload1" v-if="isUpload" @getImgs="getImgsFunc"></Upload>
		<!-- 上传图片 -->
		<Uploads ref="upload2" v-if="isUpload1" @getImgs="getImgsFunc1"></Uploads>
		<!-- 人脸认证 -->
		<!-- <Rellianrz  :ids="ddids" ref="renlianrz"></Rellianrz> -->
	</view>
</template>

<script>
	import uniPopup from '@/components/uni-popup.vue';
	import MyInfo from './confirm-order/my-info';
	import MyInfos from './confirm-order/my-infos';
	import Coupon from './confirm-order/coupon';
	import Dist from './confirm-order/distr';
	import Upload from '@/components/upload/uploadOne.vue';
	import Uploads from '@/components/upload/uploadOne.vue';
	// import Rellianrz from '@/components/rellianrz.vue';

	import {
		pay
	} from '@/common/pay.js';

	export default {
		components: {
			MyInfo,
			MyInfos,
			Coupon,
			Dist,
			Upload,
			Uploads,
			// Rellianrz
		},
		data() {
			return {
				list1: [{
					name: '快递配送',
				}, {
					name: '门店自提',
				}, ],
				current:0,
				// 姓名
				myname: '',
				isUpload: false,
				isUpload1: false,
				// 身份证信息
				formData: {
					sfzpositive: "",
					sfzback: "",
				},
				// 个人信息
				radiovalue1: 0,
				lxr1: {
					name: "",
					// jjname: '',
					tel: "",
					relation: null
				},
				radiolist1: [{
						name: '父母',
						val: 1,
						disabled: false
					},
					{
						name: '配偶',
						val: 5,
						disabled: false
					},
					{
						name: '其他亲属',
						val: 9,
						disabled: false
					}
				],
				verify: false, //验证信息显示
				orderPersonalInformation: "", // 0显示 1隐藏
				dp_status:"",
				tkheight: null, //手机高度
				animation: '', //动画样式
				checkedData: false, //同意协议
				zfshow: 0,
				tokendata: "",
				suiping: false,
				buy_out_price: "",
				lease_type: "",
				order_total_price: "",
				realVal: "",
				order_total_num: "",
				zmshow1: "",
				ddids: "",
				value1: "",
				value2: "",
				showdd: false,
				show1: false,
				show2: false,
				res: '',
				/*是否加载完成*/
				loading: false,
				options: {},
				indicatorDots: true,
				autoplay: true,
				interval: 2000,
				duration: 500,
				/*商品id*/
				product_id: '',
				/*商品数量*/
				product_num: '',
				/*商品数据*/
				ProductData: [],
				/*订单数据数据*/
				OrderData: [],
				// 是否存在收货地址
				exist_address: false,
				/*默认地址*/
				Address: {
					region: []
				},
				Address_ziti: {},
				ziti:'',
				extract_store: [],
				last_extract: {},
				product_sku_id: 0,
				/*配送方式*/
				delivery: 10,
				/*自提店id*/
				store_id: 0,
				/*优惠券id*/
				coupon_id: -1,
				/*是否使用积分,默认使用*/
				is_use_points: 1,
				remark: '',
				/*支付方式*/
				pay_type: 20,
				/*是否显示优惠券*/
				isCoupon: false,
				/*优惠券列表*/
				coupon_list: {},
				couponList: [],
				/*优惠券数量*/
				coupon_num: 0,
				/* 是否显示配送方式 */
				isDist: false,
				/*消息模板*/
				temlIds: [],
				/* 选择的地址 */
				// chooseAd:''
				product_couponid: 0,
				chooseSotr: 0,
				/* 支持的配送方式 */
				deliverySetting: [],
				choose_delivery: 10,
				store_data: {},
				// 当前店铺选择的门店
				choose_store_id: 0,
				store_list: {},
				room_id: '',
				/*是否显示支付宝支付，只有在h5，非微信内打开才显示*/
				showAlipay: false,
				balance: '',
				store_open: 1,
				isgreed: false,
				lease_time: {},
				start_time: '',
				end_time: '',
				states2: '',
				//租赁计划的分期
				timedata: {},
				listdata: '',
				zqi: "",
				datekey:0,
			};
		},
		onLoad(options) {
			let self = this;
			self.zqi = options.zhouqi;
			self.zmshow1 = options.zmshow;
			self.tokendata = uni.getStorageSync('token');

			uni.getSystemInfo({
				success(res) {
					self.tkheight = res.windowHeight * 2;
				}
			})
			self.getIndexdata();

			let time = parseInt(new Date().getTime() / 1000) + '';
			time = parseInt(time);

			let now = new Date();
			let timestamp = now.getTime();
			// let week = 86400000 * (30 + 3)
			self.start_time = self.timestamp2(timestamp + 86400000 * 3)
			self.end_time = self.timestamp2(timestamp + 86400000 * (3 + self.zqi * 30))
			let zqi = parseInt(self.zqi);
			for (let i = 1; i <= zqi; i++) {
				self.timedata[i] = self.timestamp2(timestamp + (86400000 * (30 * i + 3)))
			}

			self.options = options;
			self.room_id = options.room_id ? options.room_id : 0,
				self.$fire.on('selectStoreId', function(e) {
					console.log(e, '自提地址信息')
					self.extract_store = e;
					self.choose_store_id = e.store_id;
					const region = e.region;
					self.states2 = {
						fullname: e.store_name,
						mobilePhone: e.phone,
						prov: region.province,
						city: region.city,
						area: region.region,
						address: e.address
					}
				});
			self.$fire.on('checkedfir', function(n) {
				self.choose_delivery = n;
			})
		},
		onShow() {
			let self = this;
			self.getData();
			// self.init()
			// uni.$on('update', function(data) {
			// 	if (data == "rzcg") {
			// 		self.SubmitOrder();
			// 		return
			// 	}
			// })
		},
		methods: {
			tabsClick(item){
				this.current = item.index
				if(item==0){
					this.delivery = 10
				}
				if(item==1){
					this.delivery = 20
				}
			},
			// 提交联系人
			submitlxr() {
				let self = this;
				self.loading = true;
				if(!self.lxr1.name||!self.lxr1.tel||!self.lxr1.relation||!self.formData.sfzpositive||!self.formData.sfzback){
					uni.showToast({
						title: "请将信息填写完成",
						duration: 2000
					})
					self.loading = false;
					return
				}
				self._post('user.user/realNameAuthentication', {
					// jjrealname: self.lxr1.jjname,
					contactName: self.lxr1.name,
					contactPhone: self.lxr1.tel,
					contactRelation: self.lxr1.relation,
					sfzpositive: self.formData.sfzpositive,
					sfzback: self.formData.sfzback
				}, function(res) {
					if (res.code == 1) {
						uni.showToast({
							title: res.msg,
							duration: 2000
						});
						self.verify = false;
						self.loading = false;
					} else {
						uni.showToast({
							title: "提交失败,请重新提交或联系客服!!",
							duration: 2000
						});
					}
				});
			},
			// 获取后台设置数据
			getIndexdata() {
				let self = this;
				self._get('index/index', {}, function(res) {
					self.orderPersonalInformation = res.data.setting.store.orderPersonalInformation;
					self.dp_status = res.data.setting.store.dp_status;
				});
			},
			/*获取上传的图片正面*/
			getImgsFunc(e) {
				let self = this;
				if (e && typeof(e) != 'undefined') {
					self.formData.sfzpositive = e[0].file_path;
					self.isUpload = false;
				}
			},
			/* 修改头像 */
			changeAvatarUrl() {
				let self = this;
				self.isUpload = true;
			},
			/*获取上传的图片反面*/
			getImgsFunc1(e) {
				let self = this;
				if (e && typeof(e) != 'undefined') {
					self.formData.sfzback = e[0].file_path;
					self.isUpload1 = false;
				}
			},
			/* 修改头像 */
			changeAvatarUrl1() {
				let self = this;
				self.isUpload1 = true;
			},
			// 时间戳转换成日期
			timestamp2(data) {
				let timestamp = data;
				let date = new Date(timestamp);
				// 获取年份
				let year = date.getFullYear();
				// 获取月份（注意月份从 0 开始，所以要加 1）
				let month = date.getMonth() + 1;
				month < 10 ? month = "0" + month : "";
				// 获取日期
				let day = date.getDate();
				day < 10 ? day = "0" + day : "";
				// 	// 获取小时
				// 	let hours = date.getHours();
				// 	// 获取分钟
				// 	let minutes = date.getMinutes();
				// 	// 获取秒数
				// 	let seconds = date.getSeconds();
				return `${year}-${month}-${day} ` // ${hours}:${minutes}:${seconds}
			},
			// 选择协议同意
			checkedChange() {
				this.checkedData = true;
			},
			// 支付宝登录
			async onGetAuthorize1() {
				my.getAuthCode({
					scopes: ['auth_base'],
					success: (res) => {
						my.getPhoneNumber({
							success: (res1) => {
								let encryptedData = res1.response;
								encryptedData = JSON.parse(encryptedData);
								let response = encryptedData.response
								this._post('user.usermp/mnpAlipayAuthLogin', {
									code: res.authCode,
									content: response
								}, res => {
									uni.setStorageSync('token', res.data.data.token);
									uni.setStorageSync('user_id', res.data.data
										.user_id);
									uni.showToast({
										title: '登录成功'
									});
									this.tokendata = 1;
									this.getData();
								})
							},
							fail: (res) => {
								reject(res);
							}
						});
					},
				});
			},

			// 获取支付宝会员信息
			getAlipayUserInfo() {
				return new Promise((resolve, reject) => {
					my.getOpenUserInfo({
						success: (res) => {
							const userInfo = JSON.parse(res.response)
							// .response; // 以下方的报文格式解析两层 response   
							resolve(userInfo);
							console.log("成功");

						},
						fail: (res) => {
							console.log("失败")
							reject(res);
						}
					});
				});
			},

			// 拒绝操作
			onAuthError() {
				uni.showModal({
					title: "提示",
					content: "取消授权，可能导致服务无法使用，或者页面显示不完整",
					success: function(res) {
						if (res.confirm) {
							console.log("取消授权")
						} else {
							console.log("重新授权")
						}
					}
				})
			},
			//优惠券的点击事件
			youhui() {
				this.show1 = true
			},
			open1() {
				// console.log('open');
			},
			close1() {
				this.show1 = false
				// console.log('close');
			},
			//租赁计划的点击事件
			huankuan() {
				this.show2 = true
			},
			open2() {
				// console.log('open');
			},
			close2() {
				this.show2 = false
				// console.log('close');
			},
			/*把时间戳转普通时间*/
			getLocalTime(nS) {
				return new Date(parseInt(nS) * 1000).toLocaleString().substr(0, 10);
			},
			// 获取当前的时间
			getNowTime(date) {
				if (date !== '' && date !== undefined && date != null) {
					date = parseInt(date) * 1000
					date = new Date(date)
					var y = date.getFullYear()
					var m = date.getMonth() + 1
					m = m < 10 ? '0' + m : m
					var d = date.getDate()
					d = d < 10 ? '0' + d : d
					return y + '-' + m + '-' + d
				} else {
					return ''
				}
			},
			fuwu() {
				console.log("服务");
				uni.navigateTo({
					url: "/pages/hetong/index"
				})
			},
			// 隐私协议
			ysi() {
				console.log("隐私");
				uni.navigateTo({
					url: "/pages/hetong/yszc"
				})
			},
			init() {
				let key = '';
				let value = "";
				let self = this;
				self.ProductData.forEach((item, index) => {
					key = item.shop_supplier_id;
					value = {
						coupon_id: item.orderData.coupon_id,
						delivery: item.orderData.delivery,
						store_id: 0,
						remark: ""
					}
					self.store_data = {
						...self.store_data,
						[key]: value
					}
				})
				// console.log(self.ProductData, "ProductDataProductData");
			},
			submit() {
				document.forms['alipaysubmit'].submit();
			},
			/**/
			hasType(e) {
				if (this.deliverySetting.indexOf(e) != -1) {
					return true;
				} else {
					return false;
				}
			},
			/*支付方式选择*/
			payTypeFunc(e) {
				this.pay_type = e;
			},
			/*是否使用积分选择*/
			onShowPoints: function(e) {
				let self = this;
				if (e.target.value == true) {
					self.is_use_points = 1;
				} else {
					self.is_use_points = 0;
				}
				self.getData();
			},
			SubSheneh() {},
			/*选择优惠卷*/
			onTogglePopupCoupon(e, id) {
				let self = this;
				if (id != 0) {
					self.chooseSotr = id.shop_supplier_id;
				} else {
					self.chooseSotr = 0;
				}
				self.isCoupon = true;
				self.couponList = e;
			},
			/*关闭优惠券*/
			closeCouponFunc(e) {
				let self = this;
				if (e && typeof e != 'number') {
					self.isCoupon = false;
					return;
				}
				if (self.chooseSotr != 0) {
					let storid = self.chooseSotr;
					if (e > 0) {
						self.store_data[storid].coupon_id = e;
					} else {
						self.store_data[storid].coupon_id = 0;
					}
					self.chooseSotr = 0;
				} else {
					if (e > 0) {
						self.coupon_id = e;
					} else {
						self.coupon_id = 0;
					}

				}
				self.isCoupon = false;
				self.getData();
			},
			radioChange(e) {
				// console.log(111, e.detail.value);
				this.isgreed = Boolean(e.detail.value)
			},
			/*获取数据*/
			getData() {
				let self = this;
				// uni.showLoading({
				// 	title: '加载中'
				// });
				let callback = function(res) {

					// console.log('res',res)
					var str1 = res.data.orderInfo.supplierList[0].productList[0].product_sku.product_attr;
					// console.log(str1.indexOf("不") != -1,str1,"是否存在");
					if (str1.indexOf("不") != -1) {
						// console.log("存在");
						self.suiping = false;
					} else {
						self.suiping = true;
					}
					self.buy_out_price = res.data.orderInfo.supplierList[0].productList[0].product_sku.buy_out_price;
					console.log('获取数据', self.buy_out_price)

					// console.log(res.data.orderInfo.lease_time.lease_type, "resresres");
					self.lease_type = res.data.orderInfo.lease_time.lease_type
					// self.OrderData = res.data.orderInfo.orderData;
					self.OrderData = res.data.orderInfo.supplierList[0].orderData;
					console.log('最新地址', self.OrderData)
					self.lease_time = res.data.orderInfo.lease_time;

					self.order_total_num = res.data.orderInfo.orderData.order_total_num;
					self.total_amount = res.data.orderInfo.lease_time.total_amount;
					let meiri = self.order_total_num * self.total_amount
					let realVal = parseFloat(meiri).toFixed(2)
					self.realVal = realVal
					self.order_total_price = res.data.orderInfo.orderData.order_total_price

					self.temlIds = res.data.template_arr;
					self.exist_address = self.OrderData.exist_address;
					self.Address = self.OrderData.address;



					self.last_extract = self.OrderData.last_extract;
					self.ProductData = res.data.orderInfo.supplierList;
					self.ziti = self.ProductData[0]
					// console.log(self.ProductData, 'self.ProductData');
					// self.coupon_list = self.OrderData.coupon_list;
					// self.coupon_id = self.OrderData.coupon_id_sys;
					// self.coupon_num = Object.keys(self.coupon_list).length;
					
					
					if (self.options.order_type != 'deposit') {
						self.coupon_list = self.OrderData.coupon_list || [];
						self.coupon_id = self.OrderData.coupon_id_sys;
						self.coupon_num = Object.keys(self.coupon_list).length;
					}
					self.balance = res.data.balance;
					//#ifdef MP-WEIXIN
					self.store_open = res.data.store_open;
					//#endif
					if (self.OrderData.order_pay_price == 0) {
						self.pay_type = 10;
					}
					console.log('执行到这里面了3333')
					self.datekey++
					console.log(self.datekey++)
					if (JSON.stringify(self.store_data) == "{}") {
						console.log('执行到这里面了')
						self.init()
					}
					if (res.data.show_alipay) {
						self.showAlipay = true;
					}
					self.loading = false;
				};

				// 请求的参数
				let params = {
					delivery: self.delivery,
					store_id: self.store_id,
					coupon_id: self.coupon_id,
					is_use_points: self.is_use_points,
					pay_source: self.getPlatform(),
					address: {
						name: self.states2.fullname,
						phone: self.states2.mobilePhone,
						province: self.states2.prov,
						city: self.states2.city,
						region: self.states2.area,
						detail: self.states2.address
					},
					zhouqi: self.zqi


				};
				// name: self.OrderData.address.name,
				// phone:self.OrderData.address.phone,
				// province: self.OrderData.address.region.province,
				// city: self.OrderData.address.region.city,
				// region: self.OrderData.address.region.region,
				// detail: self.OrderData.address.detail

				// app_id: 10001
				// city: 杭州市
				// country: 中国
				// district: 西湖区
				// params: {"pay_type":20,"room_id":0,"coupon_id":0,"is_use_points":1,"address":{"name":"Bob","phone":"13888888888","province":"浙江省","city":"杭州市","region":"西湖区","detail":"蚂蚁Z空间 不放自提柜 送到家 送到家 送到家 送到家"},"zhouqi":"12","supplier":{"1":{"coupon_id":0,"delivery":"10","store_id":0,"remark":""}},"product_id":"306","product_num":"1","product_sku_id":"83_68_79_289_512_451_1"}
				// province: 浙江省
				// supplierid: 
				// tguser_id: 
				// token: c8abdefc0240ad1b5642f28cf413863d
				


				if (JSON.stringify(self.store_data) == "{}") {
					console.log('执行到这里面2')
					params = params;
				} else {
					console.log('执行到这里面', self.store_data)
					params = {
						...params,
						supplier: self.store_data
					};
				}

				params: JSON.stringify(
					Object.assign({}, params, {
						product_id: self.options.product_id,
						product_num: self.options.product_num,
						product_sku_id: self.options.product_sku_id,
					})
				)
				console.log(self.options, 'options');
				console.log("params", params);


				//直接购买
				if (self.options.order_type === 'buy') {
					self._get(
						'order.order/buy', {
							params: JSON.stringify(
								Object.assign({}, params, {
									product_id: self.options.product_id,
									product_num: self.options.product_num,
									product_sku_id: self.options.product_sku_id,
								})
							)
						},
						function(res) {
							callback(res);
						}
					);
				}
				// 购物车结算
				else if (self.options.order_type === 'cart') {
					self._get(
						'order.order/cart', {
							params: JSON.stringify(
								Object.assign({}, params, {
									cart_ids: self.options.cart_ids || 0
								})
							)
						},
						function(res) {
							callback(res);
						}
					);
				}
				// 积分兑换结算
				else if (self.options.order_type == 'points') {
					self._get(
						'plus.points.order/buy', {
							params: JSON.stringify(
								Object.assign({}, params, {
									point_product_id: self.options.point_product_id,
									product_sku_id: self.options.product_sku_id,
									point_product_sku_id: self.options.point_product_sku_id,
									product_num: self.options.product_num
								})
							)
						},
						function(res) {
							callback(res);
						}
					);
				}
				// 限时秒杀
				else if (self.options.order_type === 'seckill') {
					params.num = self.options.num;
					self._get(
						'plus.seckill.order/buy', {
							params: JSON.stringify(
								Object.assign({}, params, {
									seckill_product_id: self.options.seckill_product_id,
									product_sku_id: self.options.product_sku_id,
									seckill_product_sku_id: self.options.seckill_product_sku_id,
									product_num: self.options.product_num
								}))
						}

						,
						function(res) {
							callback(res);
						}
					);
				}
				//砍价
				else if (self.options.order_type === 'bargain') {
					self._get(
						'plus.bargain.order/buy', {
							params: JSON.stringify(
								Object.assign({}, params, {
									bargain_product_id: self.options.bargain_product_id,
									product_sku_id: self.options.product_sku_id,
									bargain_product_sku_id: self.options.bargain_product_sku_id,
									bargain_task_id: self.options.bargain_task_id
								})
							)
						},
						function(res) {
							callback(res);
						}
					);
				}
				//拼团
				else if (self.options.order_type === 'assemble') {
					self._get(
						'plus.assemble.order/buy', {
							params: JSON.stringify(
								Object.assign({}, params, {
									assemble_product_id: self.options.assemble_product_id,
									product_sku_id: self.options.product_sku_id,
									assemble_product_sku_id: self.options.assemble_product_sku_id,
									product_num: self.options.product_num,
									assemble_bill_id: self.options.assemble_bill_id,
								})
							)
						},
						function(res) {
							callback(res);
						}
					);
				}
			},

			toDecimal2(x) {
				var f = parseFloat(x);
				if (isNaN(f)) {
					return "0.00";
				}
				var f = Math.round(x * 100)
				var n = Math.round(x * 1000)
				var r = n.toString().split("");
				r = r[r.length - 1];
				if (r >= 5) {
					f = (f - 1) / 100
				} else {
					f = f / 100
				}
				var s = f.toString();
				var rs = s.indexOf('.');
				if (rs < 0) {
					rs = s.length;
					s += '.';
				}
				while (s.length <= rs + 2) {
					s += '0';
				}
				return s;
			},
			/* 配送选择 */
			DistUp(item) {
				let self = this;
				self.store_id = item.shop_supplier_id;
				self.chooseSotr = item.shop_supplier_id;
				let storid = self.chooseSotr;
				self.getData();
				self.deliverySetting = item.orderData.deliverySetting;
				self.extract_store = item.orderData.extract_store;
				this.isDist = true;
			},
			/* 关闭配送选择 */
			closeDistFunc(e) {
				let self = this;
				self.isDist = false;
				if (!self.extract_store.region) {
					return;
				}
				let storid = self.chooseSotr;
				let choose_store_id = self.choose_store_id;
				let storname = self.extract_store.region.province + self.extract_store.region.city + self.extract_store
					.region.region + self.extract_store.store_name;
				self.delivery = self.choose_delivery;
				self.store_id = storid;
				self.store_data[storid].store_id = choose_store_id;
				self.store_data[storid].delivery = self.choose_delivery;
				self.store_list[storid] = storname;
				self.chooseSotr = 0;
				self.getData();
			},
			objKeys(obj, n) {
				if (obj) {
					if (n == 1) {
						return Object.keys(obj).length
					} else {
						return Object.keys(obj)
					}
				}
			},
			changeStates: function(val) { this.states2 = val; }, //接收子传过来的states值
			close() {
				this.showdd = false;
			},
			getinfo() {
				let self = this;
				self._get('user.index/setting', {},
					function(res) {
						self.value1 = res.data.userInfo.username == 'null' ? '' : res.data.userInfo.username;
						self.value2 = res.data.userInfo.usernum == 'null' ? '' : res.data.userInfo.usernum;
					})
			},
			queding() {
				let self = this;
				if (uni.$u.test.idCard(self.value2) == false) {
					uni.showToast({
						title: '身份证号码有误,请重填！',
						duration: 2000,
						icon: 'none'
					});
					return;
				}

				if (self.value1 == '') {
					uni.showToast({
						title: '姓名不能为空！',
						duration: 2000,
						icon: 'none'
					});
					return;
				}
				self._post(
					'user.user/realNameAuthentication', {
						username: self.value1,
						usernum: self.value2,
					},
					function(res) {
						if(self.dp_status == 1){
								// 开启预授权
								self._post('/order.order/pay', {
										order_id: self.ddids
									},
									function(res) {
										// console.log("resres", res);
										uni.hideLoading();
										my.tradePay({
											orderStr: res
												.data, //orderStr从第一步：生成资金冻结订单，从服务端获取
											success: (res) => {
												// console.log(res, "res");
												if (res.resultCode == "4") {
													uni.showToast({
														title: '无权限调用 (N22104)',
														icon: 'none'
													})
												} else if (res.resultCode == "9000") {
													//支付宝人脸
													self._post('order.order/faceAuthentication', {
														order_id: self.ddids,
														name: self.value1,
														idno: self.value2
													}, (res) => {
														my.ap.openURL({
															url: res.data.url,
															success: (res) => {
																self._post('order.order/renzheng', {
																	'order_id': self.ddids,
																	'states': res.success ? 1 : 0
																}, (res) => {})
																self._post('order.order/faceStates', {
																	"states": res.success ? 1 : 0
																}, (res) => {})
																uni.navigateTo({
																	url: '/pages/order/order-detail?order_id=' +
																		self.ddids
																})
															},
															fail: (err) => my.alert({
																title: 'openURL fail: ' + JSON
																	.stringify(err)
															})
														});
													})
												} else if (res.resultCode == "8000") {
													uni.showToast({
														title: '正在处理中。支付结果未知',
														icon: 'none'
													})
												} else if (res.resultCode == "4000") {
													uni.showToast({
														title: '订单处理失败',
														icon: 'none'
													})
												} else if (res.resultCode == "6001") {
													// 用户取消支付
													// uni.navigateTo({
													// 	url: "/pages/order/bnmy"
													// })
													uni.navigateTo({
														url: '/pages/order/order-detail?order_id=' +
															self.ddids
													})
												} else if (res.resultCode == "6002") {
													uni.showToast({
														title: '网络连接出错',
														icon: 'none'
													})
												} else if (res.resultCode == "6004") {
													uni.showToast({
														title: '处理结果未知',
														icon: 'none'
													})
												}
											},
											fail: (res) => {
												uni.showToast({
													title: '支付失败！',
													icon: 'none'
												})
												uni.navigateTo({
													url: '/pages/order/order-detail?order_id=' +
														self.ddids
												})
											}
										});
									})
								
							}else{
								// 关闭预授权
								my.startAPVerify({
									url: res.data.url,
									success: (res) => {
										self._post('order.order/renzheng', {
											'order_id': self.ddids,
											'states': res.resultStatus == '9000' ? 1 : 0
										}, (res) => {})
										self._post('order.order/faceStates', {
											"states": res.resultStatus == '9000' ? 1 : 0
										}, (res) => {})
										uni.navigateTo({
											url: '/pages/order/order-detail?order_id=' +
												self.ddids
										})
									},
									fail: (err) => my.alert({
										title: 'openURL fail: ' + JSON
											.stringify(err)
									})
								})
							}
					})
			},
			testing() {
				console.log("显示");
				let self = this;
				uni.showLoading({
					title: '加载中'
				})
				self._get('user.index/detail', {}, function(res) {
					self.lxr1.name = res.data.userInfo.contactName;
					self.lxr1.jjname = res.data.userInfo.jjrealname;
					self.lxr1.tel = res.data.userInfo.contactPhone;
					self.lxr1.relation = res.data.userInfo.contactRelation;

					let contactName = res.data.userInfo.contactName;
					let contactPhone = res.data.userInfo.contactPhone;
					if (contactName && contactPhone) {
						self.tzxs()
					} else {
						self.verify = true;
					}

					self._get(
						'user.index/detail', {},
						function(res) {
							self.formData.sfzpositive = res.data.userInfo.sfzpositive;
							self.formData.sfzback = res.data.userInfo.sfzback;
						}
					);
					uni.hideLoading();
				})
			},
			// 下单
			tzxs() {
				let self = this;
				uni.showLoading({
					title: '加载中'
				});
				// 获取下单地区
				my.getLocation({
					type: 2, // 获取经纬度和省市区县数据
					success: (res) => {
						console.log(res,'获取经纬度和省市区县数据');
						let getLocationdata = {}
						getLocationdata.country = res.country;
						getLocationdata.province = res.province;
						getLocationdata.city = res.city;
						getLocationdata.district = res.district;
						getLocationdata.address_detail = `${res.streetNumber.street}${res.streetNumber.number}`
						uni.setStorageSync('getLocation', getLocationdata);
					},
					fail: (res) => {},
					complete: () => {
						if (self.checkedData == false) {
							uni.showModal({
								title: '提示',
								content: '请先同意租赁服务及相关协议',
								showCancel: false,
								confirmText: '确定'
							});
							self.animation = 'shake';
							setTimeout(() => {
								this.animation = '';
							}, 900)
							uni.hideLoading();
							return
						}
						if (!self.states2) {
							uni.showModal({
								title: '提示',
								content: '未选择地址，请选择地址重试 ~ ~',
								showCancel: false,
								confirmText: '确定'
							});
							uni.hideLoading();
							return
						}
						self.getinfo();
						console.log('获取详细地址信息',self.states2)
						let params = {
							pay_type: 30,
							room_id: self.room_id,
							coupon_id: self.coupon_id,
							is_use_points: self.is_use_points,
							address: {
								name: self.states2.fullname,
								phone: self.states2.mobilePhone,
								province: self.states2.prov,
								city: self.states2.city,
								region: self.states2.area,
								detail: self.states2.address
							},
							zhouqi: self.zqi
						};

						params = Object.assign(params, {
							supplier: self.store_data
						});
						
						
						// {"pay_type":30,"room_id":0,"coupon_id":0,"is_use_points":1,"address":{"name":"Alpha","phone":"13888888888","province":"浙江省","city":"杭州市","region":"西湖区","detail":"阿里巴巴西溪园区 不放自提柜 送到家 送到家 送到家 送到家"},"zhouqi":"6","supplier":{"1":{"coupon_id":0,"delivery":"10","store_id":0,"remark":""}},"product_id":"306","product_num":"1","product_sku_id":"83_68_79_289_316_450_1"}
						
						
						
						// 创建订单-直接下单
						if (self.options.order_type === 'buy') {
							self._post('/order.order/buy', {
									params: JSON.stringify(
										Object.assign({}, params, {
											product_id: self.options.product_id,
											product_num: self.options.product_num,
											product_sku_id: self.options.product_sku_id,
											room_id: self.options.room_id || 0,
										})
									)
								},
								function(res) {
									console.log(res, "成功");
									self.ddids = encodeURIComponent(res.data.order_id.join(','))
									self.zfshow = 1;
									uni.hideLoading();
									uni.showToast({
										title: "订单提交成功！",
										duration: 1000,
										position: 200,
									})
									setTimeout(() => {
										// self.showdd = true;
										self.$refs.renlianrz.showdd = true
										// self.SubmitOrder();
									}, 1000);
								},
								function(res) {
									console.log(res, "失败");
									uni.showToast({
										title: "提交失败！",
										duration: 1000,
										position: 200,
									})
								})

						}
						// uni.navigateTo({
						// 	url: "/pages/order/smrz"
						// })
					},
				});



			},
			/*提交订单*/
			SubmitOrder() {
				// console.log("走了提交订单SubmitOrder");
				let self = this;
				var url = '';
				var id = '';


				uni.showLoading({
					title: '加载中',
					mask: true
				});
				self._post('/order.order/pay', {
						order_id: self.ddids
					},

					function(res) {
						// console.log("resres", res);
						uni.hideLoading();
						my.tradePay({
							orderStr: res
								.data, //orderStr从第一步：生成资金冻结订单，从服务端获取
							success: (res) => {
								// console.log(res, "res");
								if (res.resultCode == "4") {
									uni.showToast({
										title: '无权限调用 (N22104)',
										icon: 'none'
									})
								} else if (res.resultCode == "9000") {
									// e签宝人脸认证（静默签必须要人脸识别）
									self._post('esign.eqb/face1', {
										order_id: self.ddids,
										name: self.value1,
										idno: self.value2
									}, (res1) => {
										my.ap.openURL({
											url: res1.data.authUrl,
											success: (res) => console.log('openURL success'),
											fail: (err) => my.alert({
												title: 'openURL fail: ' + JSON.stringify(err)
											}),
										});
									})

									//支付宝人脸
									// self._post('order.order/faceAuthentication', {
									// 	order_id: self.ddids,
									// 	name: self.value1,
									// 	idno: self.value2
									// }, (res) => {
									// 	my.ap.openURL({
									// 		url: res.data.url,
									// 		success: (res) => {
									// 			self._post('order.order/renzheng', {
									// 				'order_id': self.ddids,
									// 				'states': res.success ? 1 :
									// 					0
									// 			}, (res) => {})
									// 			self._post('order.order/faceStates', {
									// 				"states": res.success ? 1 :
									// 					0
									// 			}, (res) => {})
									// 			uni.navigateTo({
									// 				url: '/pages/order/order-detail?order_id=' +
									// 					self.ddids
									// 			})
									// 		},
									// 		fail: (err) => my.alert({
									// 			title: 'openURL fail: ' + JSON
									// 				.stringify(err)
									// 		})
									// 	});
									// })
								} else if (res.resultCode == "8000") {
									uni.showToast({
										title: '正在处理中。支付结果未知',
										icon: 'none'
									})
								} else if (res.resultCode == "4000") {
									uni.showToast({
										title: '订单处理失败',
										icon: 'none'
									})
								} else if (res.resultCode == "6001") {
									// uni.navigateTo({
									// 	url: "/pages/order/bnmy"
									// })
									uni.navigateTo({
										url: '/pages/order/order-detail?order_id=' +
											self.ddids
									})
								} else if (res.resultCode == "6002") {
									uni.showToast({
										title: '网络连接出错',
										icon: 'none'
									})
								} else if (res.resultCode == "6004") {
									uni.showToast({
										title: '处理结果未知',
										icon: 'none'
									})
								}
							},
							fail: (res) => {
								uni.showToast({
									title: '支付失败！',
									icon: 'none'
								})
								uni.navigateTo({
									url: '/pages/order/order-detail?order_id=' +
										self.ddids
								})
							}
						});
					})


			},
			/*提交订单结束*/

		},
	}
</script>

<style lang="scss">
	.animation-shake {
		animation: shake 2s !important;
	}

	.anniu {
		margin-top: 20rpx;
		width: 85%;
		border-radius: 50rpx;
	}

	.animation-shake {
		animation: shake 2s !important;
	}

	@keyframes shake {

		0%,
		100% {
			transform: translateX(0);
		}

		10% {
			transform: translateX(-18px);
		}

		20% {
			transform: translateX(8rpx);
		}

		30% {
			transform: translateX(-14rpx);
		}

		40% {
			transform: translateX(12rpx);
		}

		50% {
			transform: translateX(-10rpx);
		}

		60% {
			transform: translateX(8rpx);
		}

		70% {
			transform: translateX(-6rpx);
		}

		80% {
			transform: translateX(4rpx);
		}

		90% {
			transform: translateX(-2rpx);
		}
	}

	// .smrztkdata .u-transition {
	// 	height: 100%;
	// }
	.content2 {
		padding: 20rpx 25rpx;
		border-radius: 25rpx;
		margin: 20rpx;
		background-color: #FFFFFF;

		.top1 {
			color: #2F3131;
			font-size: 32rpx;
			font-weight: 700;
			text-align: center;

			view {
				font-size: 22rpx;
				margin-top: 5rpx;
			}
		}

		.top2 {
			display: flex;
			height: 50rpx;
			align-items: center;
			border-bottom: 1rpx solid #B0B0B0;
			padding: 25rpx 0;

			.zsname {
				font-size: 28rpx;
				margin-right: 20rpx;
			}
		}

		.top5 {
			display: flex;
			font-size: 28rpx;
			align-items: center;
			border-bottom: 1rpx solid #B0B0B0;

			.relation {
				margin-right: 20rpx;
			}
		}
	}

	.diyige {
		background-color: white;
		width: 100%;
		height: 150rpx;
		border-radius: 50rpx;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}

	.diyige image {
		width: 100%;
		height: 100%;
	}

	.sfz {
		width: 100%;
		height: 180rpx;
	}

	.jiahao {
		border-radius: 50rpx;
		width: 50rpx;
		height: 50rpx;
	}

	.shenfen {
		margin-top: 50rpx;
		text-align: center;
		// color: red;
		padding: 10rpx 0;
	}

	.content {
		width: 100%;
		height: 600rpx;
		background-color: #53A9F4;
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;

		image {
			width: 150rpx;
			height: 150rpx;
		}

		.smrz {
			color: #FFFFFF;
			margin-top: 20rpx;
			font-size: 30rpx;
		}

		.smrz2 {
			color: #FFFFFF;
			margin-top: 20rpx;
			line-height: 34rpx;
		}

		.sfxx3 {
			padding: 15rpx;

			.sfxx4 {
				padding: 15rpx 0;
			}
		}
	}

	.bs_xx {
		height: 700rpx;
		padding: 10rpx;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		background: #F5F5F5;

		.sfxx {
			width: 85%;
			padding: 30rpx 6rpx;
			background-color: #FFFFFF;
			border-radius: 50rpx;

			.sfxx2 {
				padding: 20rpx 20rpx;

				view {
					color: #43A3E8;
					margin-top: 10rpx;
				}
			}
		}

		.anniu {
			margin-top: 20rpx;
			width: 85%;
			border-radius: 50rpx;
		}
	}

	page {
		background-color: #F2F2F2;
	}

	.my_info {
		margin: 16rpx 25rpx;
		border-radius: 10rpx !important;
	}

	.wrap {
		// padding-bottom: 110rpx;
		height: 1700rpx;
	}

	.d-f-c {
		display: flex;
		justify-content: space-between;
		align-items: center;
		overflow: hidden;
		padding: 30rpx 0;
		margin: 0 30rpx;
		font-size: 24rpx;
		border-bottom: 1rpx solid #EEEEEE;

	}

	.ding1 {
		display: flex;
		justify-content: space-between;
		align-items: center;
		// overflow: hidden;
		padding: 30rpx 0;
		margin: 0 30rpx;
		font-size: 24rpx;
		border-bottom: 1rpx solid #EEEEEE;
	}

	.yhj {
		width: 200rpx;
		height: 30rpx;

	}

	.dfjac {
		display: flex;
		align-items: center;
	}

	.d-txar {
		white-space: nowrap;
		width: 200px;
		margin-right: 34rpx;
	}

	.extp {
		color: #9e9e9e;
		margin-left: 34rpx;
	}

	.buyer-message {
		margin: 500rpx !important;
	}

	.vender {
		margin: 30rpx 25rpx;
		border-radius: 20rpx;
	}

	.vender .list {
		padding-bottom: 200rpx;
	}

	.vender .list .item {
		border-bottom: none;
	}


	.icon-jiantou {
		margin-left: 15rpx;
	}

	.icon-dianpu1 {
		margin-right: 15rpx;
		font-size: 28rpx;
		color: #333333;
	}

	.sup_itemtit {
		padding: 40rpx 30rpx;
		display: flex;
		align-items: center;
	}

	.meiridata {
		padding: 10rpx 0;
		display: flex;
		justify-content: space-between;

		.yjmr {
			color: #373546;
			font-size: 34rpx;
			font-weight: bold;
			font-family: 'Adobe Heiti Std R';
		}
	}

	.qz {
		margin: 15rpx 30rpx;
		width: 650rpx;
		height: 92rpx;
		background: #EBFAF9;
		border-radius: 46rpx;
		padding: 0 42rpx;
		box-sizing: border-box;

		.biank3 {
			padding: 15rpx;

			image {
				width: 64rpx;
				height: 64rpx;
			}

			.cont {
				.sq1 {
					font-size: 24rpx;
					font-weight: 500;
					color: #151515;
					line-height: 24rpx;
				}

				.sq2 {
					font-size: 20rpx;
					font-weight: 400;
					color: #928f91;
					line-height: 20rpx;
				}
			}
		}
	}


	.vender .total-box {
		height: 90rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		background-color: #C3E6FC;
		border-radius: 50rpx;
		margin: 15rpx 30rpx;

		.biank {
			width: 300rpx;
			height: 80rpx;
			border: 1rpx;
			display: flex;
			flex-direction: row;

			image {
				height: 80rpx;
				width: 80rpx;
			}
		}

		.biank2 {
			width: 300rpx;
			height: 80rpx;
			border: 1rpx;
			display: flex;
			flex-direction: row;

			image {
				height: 80rpx;
				width: 80rpx;
			}
		}

	}

	.d-f {
		display: flex;
	}

	.zt {
		padding: 2rpx 10rpx;
		margin-right: 10rpx;
		border-radius: 8rpx;
		font-size: 22rpx;
	}

	.icon-box .icon-zhifubao {
		color: #1296db;
		font-size: 50rpx;
	}

	.icon-dianpu1 {}

	.text_area {
		width: 100%;
		height: 120rpx;
		background: #f2f2f2;
		border-radius: 6rpx;
		padding: 20rpx;
		box-sizing: border-box;
		font-size: 24rpx;
	}

	.icon-xuanze {
		font-size: 38rpx;
	}

	.suiping1 {
		.texts {
			padding-bottom: 32rpx;
			display: flex;
			justify-content: space-between;
			font-size: 24rpx;
			color: #999999;
			// width: 600rpx;

		}
	}

	.texts2 {
		// padding-top: 32rpx;
		display: flex;
		justify-content: space-between;
		font-size: 24rpx;
		color: #999999;
		// padding: 15rpx;

		.top {}

		.xia {
			border: 1rpx solid #5BC5BB;
			color: #5BC5BB;
			padding: 0 12rpx;
		}
	}


	.yhj1 {
		padding-left: 35rpx;
	}

	.yhj2 {
		color: red;
	}



	.zkjh {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		padding: 0 30rpx;

		.huankuanjihua {
			font-size: 34rpx;
			font-weight: bold;
			height: 70rpx;
			display: flex;
			align-items: center;
			font-family: 'Adobe Heiti Std R';
		}

		.xkh {}
	}



	.kongke {
		height: 12rpx;
		background-color: #F0F0F0;
	}

	.kongke2 {
		height: 12rpx;
		background-color: #F0F0F0;
	}


	.yangshi {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		height: 80rpx;
		padding-right: 15rpx;
		border-radius: 50rpx;
		align-items: center;
	}

	.dao {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		height: 70rpx;
		border-radius: 50rpx;
		align-items: center;
		font-size: 34rpx;
		font-weight: bold;
		padding: 0 30rpx;
		font-family: 'Adobe Heiti Std R';

		.dao1 {
			// font-size: 28rpx;
		}
	}

	//优惠券弹窗
	.youhui1 {
		.tanchuang {
			height: 600rpx;
			margin-top: 40rpx;

			.shuju {
				text-align: center;
				font-size: 35rpx;
			}
		}
	}

	//租赁计划弹窗
	.huankuanjihua1 {
		.tanchuang1 {

			// height: 800rpx;
			view {
				text-align: center;
				font-size: 25rpx;
				font-weight: bold;
				margin: 20rpx 0;
				height: 50rpx;
				line-height: 50rpx;

				.daoqi {
					margin-right: 80rpx;
					color: skyblue;
				}
			}

			.stime {
				margin: 0 70rpx;
			}
		}
	}

	.tis {
		margin: 0 30rpx;

		.tishi {
			font-size: 22rpx;
			color: DarkOrange;
			background-color: LightYellow;
			line-height: 35rpx;
		}
	}

	.confirmdata {
		display: flex;
		justify-content: center;

		.confirm-btn {
			width: 90%;
			height: 80rpx;
			line-height: 80rpx;
			// @include background_linearmore('cart_right1', 'cart_right2', 'right_deg', 0%, 100%);
			margin: 0 20rpx;
			color: #FFFFFF;
			font-size: 32rpx;
			background-color: #5BC5BB;
			border: none;
			font-size: 34rpx;
			border-radius: 20rpx;
			padding: 0 15rpx;
		}
	}

	.tjshkdData {
		padding: 4rpx 0;
		display: flex;
		justify-content: center;

		.tjshkd {
			width: 90%;
			font-size: 34rpx;
			border-radius: 20rpx;
			background: #5BC5BB;
    	border-radius: 46rpx;
    	border: 0;

			.sjsj {
			  margin-left: 20rpx;
				font-size: 24rpx;
				font-weight: 400;
				color: #928F91;
				line-height: 24rpx;
			}

			.sjred {
				font-size: 28rpx;
				font-weight: 300;
				color: #F54C42;
				line-height: 44rpx;

				.sjred-t {
					font-weight: bold;
					font-size: 32rpx;
				}
			}

			.sjbtn {
				width: 294rpx;
				height: 92rpx;
				background: #5BC5BB;
				border-radius: 46rpx;
				color: #FFFFFF;
				line-height: 34rpx;
				font-size: 34rpx;
				font-weight: 500;
			}
		}
	}

	.buy-checkout {
		position: fixed;
		left: 0;
		bottom: 0;
		width: 100%;
		padding-bottom: 50rpx;

		.item {
			display: flex;
			justify-content: flex-start;
			align-items: center;
			padding: 0;
			padding-left: 0.3rem;

			.tongyi {
				margin-left: 15rpx;

				.tongyi1 {
					color: #999999;
				}

				.tongyi2 {
					font-size: 24rpx;
					font-weight: 400;
					line-height: 32rpx;
					color: #5BC5BB;
				}
			}
		}
	}
</style>